package com.ruijie.acl.type;

/**
 * <p>
 * Title: 以太网协议类型枚举
 * </p>
 * <p>
 * Description: 以太网协议类型枚举
 * </p>
 * <p>
 * Copyright: Copyright (c) 2009
 * </p>
 * <p>
 * Company: Ruijie Co., Ltd.
 * </p>
 * <p>
 * Create Time: 2009-07-15
 * </p>
 * <p>
 * Update Time:
 * </p>
 * <p>
 * Updater:
 * </p>
 * <p>
 * Update Comments:
 * </p>
 * 
 * @author ASAI
 */
public enum EthernetTypeEnum {
	netbios("netbios"), arp("arp"),

	x25("x.25"), IPX("IPX"),

	aarp("aarp"), amber("amber"),

	appletalk("appletalk"), decnet_iv("decnet-iv"),

	diagnostic("diagnostic"), eapol("eapol"),

	etype_6000("etype-6000"), etype_8042("etype-8042"),

	etype_any("etype-any"), lat("lat"),

	lavc_sca("lavc-sca"), mop_console("mop-console"),

	mop_dump("mop-dump"), mumps("mumps"),

	vines_echo("vines-echo"),

	xns_idp("xns-idp");

	private String value;

	EthernetTypeEnum(String value) {
		this.value = value;
	}

	public String value() {
		return this.value;
	}

	public static EthernetTypeEnum getEnum(String type) {
		for (EthernetTypeEnum t : EthernetTypeEnum.values()) {
			if (type.equals(t.value())) {
				return t;
			}
		}
		return null;
	}
	public static void main(String[] args){
		try{
			System.out.println(EthernetTypeEnum.valueOf("x2x5")==null);
		}catch(IllegalArgumentException e){
			System.out.println("no");
		}
	}
}
